package coollemon.kernel;

import static org.junit.Assert.*;

import org.junit.Test;

import java.text.*;
import java.util.*;

public class ContactTest {

	@Test
	public void testSetEmail() {
		Contact a = null;
		try{
			a = Contact.createContact("hello");
			a.setEmail("www.cid.com@if");
			print("hello");
			assertEquals(new String("www.cid.com@if"), a.getEmail());
			Date date = DateFormat.getDateInstance().parse("1988-1-1");
			print(date);
			print("helo2");
			int c = '#';
			print(Integer.toHexString(c));
			//a.setEmail("  ");
			
		} catch(Exception e) {
			e.printStackTrace();
			System.out.println(a.getEmail());
		}
	}
	@Test
	public void testCheckPhoneNum() {
		int a = Contact.checkPhoneNum("23485+9-320#8*5");
		assertEquals(1, a);
	}
	public void print(Object p) {
		System.out.println(p);
	}

}
